import type { App } from 'vue'
import { createPinia } from 'pinia'
import { useUserStore } from './user'

const pinia = createPinia()

function registerStore(app: App) {
  // 注册pinia
  app.use(pinia)

  // 解决用户刷新丢失菜单的问题
  const userStore = useUserStore()
  userStore.localLocalCache()
}

export default registerStore
